package de.gwtprime.shared.requestFactory.request;

import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

import de.gwtprime.server.model.User2;
import de.gwtprime.shared.requestFactory.User2Proxy;

@Service(value = User2.class)
public interface User2Request extends RequestContext {

	Request<User2Proxy> findUser2(Long id);
	
	Request<User2Proxy> findUserByEmail(String mail);
	
	Request<User2Proxy> findUserInSession();
	
	InstanceRequest<User2Proxy, Long> persist();

	InstanceRequest<User2Proxy, Void> remove();
	
	InstanceRequest<User2Proxy, Long> persistNewUser();
	
}
